package com.hopedove.yieldmanage.domain.net;

import com.hopedove.net.domain.JsonParamRequest;

import org.json.JSONArray;
import org.json.JSONObject;

import java.util.List;

public class DeleteYieldInput extends JsonParamRequest {

    public DeleteYieldInput(String userBean, List<String> PKIDList) {
        try {
            JSONObject jsonObject = new JSONObject(userBean);
            putParam("userBean", jsonObject);
            JSONArray jsonData = new JSONArray();
            for (int i = 0; i < PKIDList.size(); i++) {
                JSONObject PKIDObject = new JSONObject();
                PKIDObject.put("PKID", PKIDList.get(i));
                jsonData.put(PKIDObject);
            }
            putParam("jsonData", jsonData);
        } catch (Exception e) {
            //ignore
        }
    }

    @Override
    protected String getMethod() {
        return "wageYieldInputDelete";
    }
}
